package com.cqut.forum.action;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.cqut.forum.service.ArticleReplyService;
import com.cqut.forum.service.PictureReplyService;

@Controller
public class ReplysAction {
	@Resource
	private ArticleReplyService arService;
	@Resource
	private PictureReplyService prService;
	
	@RequestMapping("/reply/delete_reply")
	@ResponseBody
	public void deleteReply(int replyId,String moduleName){
		if(moduleName.equals("article")){
			arService.deleteById(replyId);
		}
		else if(moduleName.equals("picture")){
			prService.deleteById(replyId);
		}
	}
}
